import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue'

const routes = [
  {
    path: '/',
    redirect: '/manage-base-info'
  },
  {
    path: '/manage-base-info',
    name: 'menu',
    component: Home,
    children: [
      {
        // 仓库管理
        path: 'warehouse',
        name: 'warehouse',
        component: () => import('@/views/BaseInfo/Warehouse/index.vue')
      },
      {
        // 库区管理
        path: 'area',
        name: 'area',
        component: () => import('@/views/BaseInfo/Area/index.vue')
      }
    ]
  }

]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
